<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%><%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertDefinition name="layout">
	<tiles:putAttribute name="head">
		<script type="text/javascript">
			$(function() {
				//Validform库的应用
				$("form").Validform({
					ajaxPost : true,
					customReset : true,
					tiptype : ValidUtils.siblingTip,
					callback : function(data) {
						helper.showMsg(data, {
							okHandler : function() {
								location.href = "listRole";
							}
						});
					}
				});
			});
		</script>
	</tiles:putAttribute>
	<tiles:putAttribute name="mainBody">
		<ul class="breadcrumb">
			<li><a href="listRole">角色列表</a> <span class="divider">/</span></li>
			<li class="active">创建角色</li>
		</ul>
		<form action="doCreateRole" method="post" class="form-horizontal">
			<fieldset>
				<legend>创建角色</legend>
				<div class="control-group">
					<label class="control-label">
						名称<span style="color: #F00">*</span>
					</label>
					<div class="controls">
						<input type="text" name="name" datatype="name" /> <span class="Validform_checktip"></span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">概述</label>
					<div class="controls">
						<input type="text" name="title" datatype="title" /> <span class="Validform_checktip"></span>
					</div>
				</div>
			</fieldset>
			<div class="control-group">
				<div class="controls">
					<button class="btn btn-primary" type="submit">
						<i class="icon-ok"></i>提交
					</button>
				</div>
			</div>
		</form>
	</tiles:putAttribute>
</tiles:insertDefinition>